<template>
  <div class="good" @click="$router.push(`/detail/${item.goods_id}`)">
    <div class="top-div">
      <img :src="item.goods_image" alt="" width="100%" />
    </div>
    <div class="bottom-div">
      <p class="text-ellipsis-2">{{ item.goods_name }}</p>
      <div class="price-div">
        <p class="red-price">￥{{ item.goods_price_max }}</p>
        <p class="gray-price">{{ item.line_price_max }}</p>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "searchItemCom",
  components: {},
  data() {
    return {};
  },
  props: {
    item: Object,
  },
  computed: {},
  methods: {},
  created() {},
};
</script>
<style lang="less" scoped>
.good {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 45%;
  margin: 5px;

  .top-div {
    img {
      width: 100%;
    }
  }

  .bottom-div {
    .text-ellipsis-2 {
      margin-bottom: 5px;
      font-size: 15px;
    }

    .price-div {
      display: flex;
      align-items: center;

      font-size: 14px;

      .red-price {
        color: #f14949;
        margin-right: 10px;
      }

      .gray-price {
        color: #999999;
        text-decoration: line-through;
      }
    }
  }
}
</style>
